<template>
    <el-aside :width="$store.state.isCollapsed?'64px':'240px'">

        <el-menu :collapse="$store.state.isCollapsed"
        :collapse-transition="false"
        :router="true"
        :default-active="route.fullPath">
            <!-- 侧边栏-首页 -->
            <el-menu-item index="/index">
                <el-icon><HomeFilled /></el-icon>
                <span>首页</span>
            </el-menu-item>
            <!-- 侧边栏 - 个人中心 -->
            <el-menu-item index="/center">
                <el-icon>
                    <avatar />
                </el-icon>
                <span>个人中心</span>
            </el-menu-item>
              <!-- 数据统计 -->
              <el-menu-item index="/Statistics-manage">
                <el-icon><Document /></el-icon>
                <span>数据分析</span>
            </el-menu-item>
            <!-- 用户管理 -->
            <el-sub-menu index="/user-manage" v-admin>
                <template #title>
                    <el-icon>
                        <user-filled />
                    </el-icon>
                    <span>用户管理</span>
                </template>
                <el-menu-item index="/user-manage/adduser">添加用户</el-menu-item>
                <el-menu-item index="/user-manage/userlist">用户列表</el-menu-item>
            </el-sub-menu>
            <!-- 新闻管理 -->
            <el-sub-menu index="/news-manage" v-editor>
                <template #title>
                    <el-icon>
                        <message-box />
                    </el-icon>
                    <span>新闻管理</span>
                </template>
                <el-menu-item index="/news-manage/addnews">添加新闻</el-menu-item>
                <el-menu-item index="/news-manage/newslist">新闻列表</el-menu-item>
            </el-sub-menu>
            <!-- 企业文化管理 -->
            <el-sub-menu index="/product-manage">
                <template #title>
                    <el-icon>
                        <reading />
                    </el-icon>
                    <span>文化管理</span>
                </template>
                <el-menu-item index="/product-manage/addproduct">添加企业文化</el-menu-item>
                <el-menu-item index="/product-manage/productlist">企业文化列表</el-menu-item>
            </el-sub-menu>
            <!-- 产品管理 -->
            <el-sub-menu index="/box-manage" v-editor>
                <template #title>
                    <el-icon>
                        <Bell />
                    </el-icon>
                    <span>产品管理</span>
                </template>
                <el-menu-item index="/box-manage/addbox">添加产品</el-menu-item>
                <el-menu-item index="/box-manage/boxlist">产品列表</el-menu-item>
            </el-sub-menu>
            <!-- 文档管理 -->
            <el-sub-menu index="/documentation-manage">
                <template #title>
                    <el-icon>
                        <Message />
                    </el-icon>
                    <span>文档管理</span>
                </template>
                <el-menu-item index="/documentation-manage/adddocumentation">添加文档</el-menu-item>
                <el-menu-item index="/documentation-manage/documentationlist">文档列表</el-menu-item>
            </el-sub-menu>
            <!-- 招聘管理 -->
            <el-sub-menu index="/recruit-manage" v-editor>
                <template #title>
                    <el-icon>
                        <ChatLineSquare />
                    </el-icon>  
                    <span>招聘管理</span>
                </template>
                <el-menu-item index="/recruit-manage/addrecruit">添加岗位信息</el-menu-item>
                <el-menu-item index="/recruit-manage/recruitlist">岗位信息列表</el-menu-item>
            </el-sub-menu>
            

        </el-menu>
    </el-aside>
</template>

<!-- 导入组件 -->
<script setup>
import {HomeFilled,Avatar,UserFilled,MessageBox,Reading,Pointer,Histogram,ChatLineSquare,Message,Bell,Document} from '@element-plus/icons-vue'
import { useRoute } from 'vue-router';
import { useStore } from 'vuex';
const route = useRoute()

const store = useStore()
</script>

<!-- 局部影响 - 样式 -->
<style lang="scss" scoped>
.el-aside {
    height: 100vh;

    .el-menu{
        height: 100vh;
    }
}
</style>